package cn.tedu.csmall.product.pojo.param;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 添加品牌的参数类
 */
@Data
@Accessors(chain = true)
public class BrandAddNewParam implements Serializable {

    /**
     * 品牌名称
     */
    @NotNull(message = "添加品牌失败，必须输入品牌名称！")
    @ApiModelProperty(value = "品牌名称",required = true,example = "比丘")
    private String name;

    /**
     * 品牌名称的拼音
     */
    @NotNull(message = "添加品牌失败，必须输入品牌拼音！")
    @ApiModelProperty(value = "品牌拼音",required = true,example = "biqiu")
    private String pinyin;

    /**
     * 品牌logo的URL
     */
    @ApiModelProperty(value = "品牌logo",required = false,example = "http://...")
    private String logo;

    /**
     * 品牌简介
     */
    @ApiModelProperty(value = "品牌简介",required = false,example = "比丘的简介")
    private String description;

    /**
     * 关键词列表，各关键词使用英文的逗号分隔
     */
    @ApiModelProperty(value = "关键词",required = false,example = "关键词1,关键词2,关键词3")
    private String keywords;

    /**
     * 排序序号
     */
    @NotNull(message = "添加品牌失败，必须输入品牌序号！")
    @Range(max = 99,message = "添加品牌失败，排序序号值必须在0~99之间！")
    @ApiModelProperty(value = "排序序号",required = true,example = "11")
    private Integer sort;

    /**
     * 是否启用，1=启用，0=未启用
     */
    @Range(max = 1,message = "添加品牌失败，是否启用必须是0或1！")
    @ApiModelProperty(value = "是否启用",required = true,example = "1")
    private Integer enable;
}
